Skip to content

Removes the Lightspeed Core (lcore) code#1566

Open
blublinsky wants to merge 1 commit into
openshift:mainfrom
blublinsky:remove-lcore
Open

Removes the Lightspeed Core (lcore) code#1566
blublinsky wants to merge 1 commit into
openshift:mainfrom
blublinsky:remove-lcore

Conversation

@blublinsky
Copy link
Copy Markdown
Contributor

Description

Summary
Removes the Lightspeed Core (lcore) code path and makes the operator appserver-only again. Drops unused Llama Stack / generic provider API surface and CRD rules, trims dead helpers and tests, refreshes bundle/CRD/CSV and docs to match, and adds or extends unit tests (watchers, related images, TLS, controller helpers).

Motivation
The lcore stack and related API knobs were no longer the supported deployment model; keeping them duplicated logic, tests, and CRD surface without a clear product path. This PR consolidates on the legacy app server reconciliation flow and aligns the API, admission rules, and OLM bundle with what the controller actually implements.

What changed
Controller & entrypoint
internal/controller/lcore/ removed; reconciliation goes console → postgres → appserver only.
cmd/main.go: drop lcore-specific flags and wiring.
internal/controller/olsconfig_controller.go / olsconfig_helpers.go: reconcile path and comments updated for the single backend.
API & CRD
api/v1alpha1/olsconfig_types.go: remove DeploymentConfig.llamaStack (and related tuning), remove generic ProviderSpec fields (providerType, config, llamaStackGeneric enum / validations).
config/crd/bases/ and bundle/manifests/ols.openshift.io_olsconfigs.yaml: regenerated to match.
config/manifests/bases/ / bundle/manifests/ CSV: specDescriptors and bundle metadata updated (e.g. removed paths for dropped fields).
Validation & utils
internal/controller/utils/utils.go: simplify ValidateLLMCredentials (no generic JSON path); keep a defensive error for stale llamaStackGeneric in cluster data; refresh godoc to match behavior.
Remove internal/controller/utils/credentials.go, utils_generic_provider_test.go, and large chunks of obsolete test_fixtures.go / misc tests tied to removed flows.
Supporting packages
internal/relatedimages: lazy load related_images.json with a mutex, plus loader_test.go.
internal/controller/watchers: behavior tweaks and expanded tests.
internal/tls: additional tls_security_profile tests.
New / expanded tests: olsconfig_reconciler_test.go, resource_defaults_test.go, and targeted updates in appserver/postgres tests.
Docs & tooling
AGENTS.md, ARCHITECTURE.md, CONTRIBUTING.md, and related assistant/docs copy: remove lcore / --enable-lcore references; describe the current reconciliation model.
Makefile: BUNDLE_TAG set to 1.0.11 so local make bundle matches shipped CSV/version.
bundle.Dockerfile / hack/bundle.Dockerfile: bundle image release/version labels aligned with 1.0.11.
Breaking / operational notes
Existing OLSConfig manifests that still set removed fields (e.g. ols.deployment.llamaStack, llm.providers[].providerType / generic config, type: llamaStackGeneric) will fail CRD validation or operator validation until edited. Call this out in release notes if customers may have old YAML checked into Git or left on-cluster.

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up dependent library

Related Tickets & Documents

  • Related Issue #
  • Closes #

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

@openshift-ci openshift-ci Bot requested review from bparees and xrajesh April 28, 2026 19:53
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 28, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign bparees for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@blublinsky
Copy link
Copy Markdown
Contributor Author

/retest

@blublinsky blublinsky force-pushed the remove-lcore branch 2 times, most recently from 6cc5a4a to ff35329 Compare May 11, 2026 17:46
@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 11, 2026
name: Red Hat, Inc
url: https://github.com/openshift/lightspeed-service
version: 1.0.12
version: 1.0.11
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may need a rebase @blublinsky Version

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

}))
})

It("should return the built-in profile when type is old", func() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@blublinsky this is not related to lcore change - can we keep this separate ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment thread internal/relatedimages/loader.go Outdated
root := findModuleRoot(cwd)
filePath = filepath.Join(root, "related_images.json")
}
func loadImagesFromDisk() map[string]string {
Copy link
Copy Markdown
Contributor

@xrajesh xrajesh May 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@blublinsky Should this change be part of lcore removal?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 12, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 12, 2026

@blublinsky: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/bundle-e2e-4-21 1892695 link true /test bundle-e2e-4-21

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants